home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / librw / RWIterator.z / RWIterator
Encoding:
Text File  |  1998-10-30  |  3.5 KB  |  133 lines

  1.  
  2.  
  3.  
  4. RRRRWWWWIIIItttteeeerrrraaaattttoooorrrr((((3333CCCC++++++++))))                                              RRRRWWWWIIIItttteeeerrrraaaattttoooorrrr((((3333CCCC++++++++))))
  5.  
  6.  
  7.  
  8. NNNNaaaammmmeeee
  9.      RWIterator - Rogue Wave library class
  10.  
  11. SSSSyyyynnnnooooppppssssiiiissss
  12.               #include <rw/iterator.h>
  13.  
  14.  
  15.  
  16.               typedef RWIterator Iterator;  // "Smalltalk" typedef
  17.  
  18.  
  19.  
  20.  
  21. DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  22.      Class RRRRWWWWIIIItttteeeerrrraaaattttoooorrrr is an abstract base class for iterators used by the
  23.      Smalltalk-like collection classes.  The class contains virtual functions
  24.      for positioning and resetting the iterator.  They are all ppppuuuurrrreeee vvvviiiirrrrttttuuuuaaaallll
  25.      functions, meaning that deriving classes must supply a definition.  The
  26.      descriptions below are intended to be generic -- all inheriting iterators
  27.      generally follow the described pattern.
  28.  
  29. PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
  30.      None
  31.  
  32. PPPPuuuubbbblllliiiicccc VVVViiiirrrrttttuuuuaaaallll FFFFuuuunnnnccccttttiiiioooonnnnssss
  33.               virtual RWCollectable*
  34.           ffffiiiinnnnddddNNNNeeeexxxxtttt(const RWCollectable* target) = 0;
  35.  
  36.  
  37.      Moves the iterator forward to the next item which "matches" the object
  38.      pointed to by target and returns it or nnnniiiillll if no item was found.  For
  39.      most collections, an item "matches" the target if either iiiissssEEEEqqqquuuuaaaallll(((()))) or
  40.      ccccoooommmmppppaaaarrrreeeeTTTToooo(((()))) indicate equivalence, whichever is appropriate for the actual
  41.      collection type.  However, when an iterator is used with an "identity
  42.      collection" (iiii....eeee...., RRRRWWWWIIIIddddeeeennnnttttiiiittttyyyySSSSeeeetttt and RRRRWWWWIIIIddddeeeennnnttttiiiittttyyyyDDDDiiiiccccttttiiiioooonnnnaaaarrrryyyy), it looks for
  43.      an item with the same address (iiii....eeee...., "is identical to").
  44.  
  45.               virtual RWCollectable*
  46.           kkkkeeeeyyyy() const = 0;
  47.  
  48.  
  49.      Returns the item at the current iterator position.
  50.  
  51.               virtual RWCollectable*
  52.           ooooppppeeeerrrraaaattttoooorrrr()() = 0;
  53.  
  54.  
  55.      Advances the iterator and returns the next item, or nnnniiiillll if the end of the
  56.      collection has been reached.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RRRRWWWWIIIItttteeeerrrraaaattttoooorrrr((((3333CCCC++++++++))))                                              RRRRWWWWIIIItttteeeerrrraaaattttoooorrrr((((3333CCCC++++++++))))
  71.  
  72.  
  73.  
  74.               virtual void
  75.           rrrreeeesssseeeetttt() = 0;
  76.  
  77.  
  78.      Resets the iterator to the state it had immediately after construction.
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.